<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/28
 * Time: 19:01
 */
header("Content-Type:application/json;charset=utf-8");
header("Access-Control-Allow-Origin:*");

$dbHost="localhost";
$connName="root";
$connPwd="";
$dbName="goujiuwang";
$connPort="3306";

//1.创建链接
$connection=new mysqli($dbHost,$connName,$connPwd,$dbName,$connPort);
//2.设置链接链接字符集
mysqli_query($connection,"set names utf8");